package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.woniuxy.dao.RoleMapper;
import com.woniuxy.pojo.Role;
import com.woniuxy.service.RoleService;

@Transactional
@Service
public class RoleServiceImpl implements RoleService {
	@Autowired
	private RoleMapper roleMapper;

	@Override
	public List<Role> selectAll() {
		return roleMapper.selectAll();
	}

	@Override
	public void deleteOneById(Integer id) {
		roleMapper.deleteOneById(id);
	}

	@Override
	public void deleteManyRole(String ids) {
		roleMapper.deleteManyRole(ids);
	}

	@Override
	public void addOne(Role role) {
		roleMapper.addOne(role);
	}

	@Override
	public Role selectRoleById(Integer id) {
		return roleMapper.selectRoleById(id);
	}

}
